<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html ng-app="index" ng-controller="indexController">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="x-ua-compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi"/>
        <meta name="mobile-web-app-capable" content="yes"/>
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <link rel="icon" type="image/png" href="images/logo-64.png"/>
        <link rel="icon" type="image/png" sizes="144x144" href="images/logo-144.png"/>
        <link rel="apple-touch-icon" type="image/png" href="images/logo-144.png"/>
        <link rel="stylesheet" type="text/css" href="webjars/simonwep__pickr/1.2.6/dist/themes/monolith.min.css"/>
        <link rel="stylesheet" type="text/css" href="app.css?v=${project.version}">
        <title ng-bind="page.title | translate"></title>
    </head>
    <body ng-class="page.bodyClassName">

        <div ng-if="!fatalError">

            <!-- Content for logged-in users -->
            <div ng-if="!expectedCredentials">

                <!-- Global status/error dialog -->
                <div ng-class="{shown: guacNotification.getStatus()}" class="status-outer">
                    <div class="status-middle">
                        <guac-notification notification="guacNotification.getStatus()"></guac-notification>
                    </div>
                </div>

                <div id="content" ng-view>
                </div>

            </div>

            <!-- Login screen for logged-out users -->
            <guac-login ng-show="expectedCredentials"
                        help-text="loginHelpText"
                        form="expectedCredentials"
                        values="acceptedCredentials"></guac-login>

        </div>

        <!-- Absolute fatal error -->
        <div ng-if="fatalError" ng-class="{shown: fatalError}" class="fatal-page-error-outer">
            <div class="fatal-page-error-middle">
                <div class="fatal-page-error">
                    <h1 translate="APP.DIALOG_HEADER_ERROR"></h1>
                    <p translate="APP.ERROR_PAGE_UNAVAILABLE"></p>
                </div>
            </div>
        </div>

        <!-- Reformat URL for AngularJS if query parameters are present -->
        <script type="text/javascript" src="relocateParameters.js"></script>

        <!-- Utility libraries -->
        <script type="text/javascript" src="webjars/jquery/3.3.1/dist/jquery.min.js"></script>
        <script type="text/javascript" src="webjars/lodash/4.17.10/dist/lodash.min.js"></script>

        <!-- AngularJS -->
        <script type="text/javascript" src="webjars/angular/1.6.9/angular.min.js"></script>
        <script type="text/javascript" src="webjars/angular-route/1.6.9/angular-route.min.js"></script>
        <script type="text/javascript" src="webjars/angular-touch/1.6.9/angular-touch.min.js"></script>

        <!-- Internationalization -->
        <script type="text/javascript" src="webjars/messageformat/1.0.2/messageformat.min.js"></script>
        <script type="text/javascript" src="webjars/angular-translate/2.16.0/angular-translate.min.js"></script>
        <script type="text/javascript" src="webjars/angular-translate-interpolation-messageformat/2.16.0/angular-translate-interpolation-messageformat.min.js"></script>
        <script type="text/javascript" src="webjars/angular-translate-loader-static-files/2.16.0/angular-translate-loader-static-files.min.js"></script>

        <!-- JSTZ -->
        <script type="text/javascript" src="webjars/jstz/1.0.10/dist/jstz.min.js"></script>

        <!-- Pickr (color picker) -->
        <script type="text/javascript" src="webjars/simonwep__pickr/1.2.6/dist/pickr.es5.min.js"></script>

        <!-- Polyfills for the "datalist" element, Blob and the FileSaver API -->
        <script type="text/javascript" src="webjars/blob-polyfill/1.0.20150320/Blob.js"></script>
        <script type="text/javascript" src="webjars/datalist-polyfill/1.14.0/datalist-polyfill.min.js"></script>
        <script type="text/javascript" src="webjars/filesaver/1.3.3/FileSaver.min.js"></script>

        <!-- Allow arbitrary ordering of Angular module creation and retrieval -->
        <script type="text/javascript" src="webjars/angular-module-shim/0.0.4/angular-module-shim.js"></script>

        <!-- Web application -->
        <script type="text/javascript" src="app.js?v=${project.version}"></script>

    </body>
</html>
